// TF_CAXBaseView.h : interface of the CTF_CAXBaseView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TF_CAXBASEVIEW_H__F08B53B2_B252_46B7_8C77_7193B72E5FDE__INCLUDED_)
#define AFX_TF_CAXBASEVIEW_H__F08B53B2_B252_46B7_8C77_7193B72E5FDE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <gl/gl.h>
#include <gl/glu.h>

class CTF_CAXBaseView : public CView
{
protected: // create from serialization only
	CTF_CAXBaseView();
	DECLARE_DYNCREATE(CTF_CAXBaseView)

// Attributes
public:
	CTF_CAXBaseDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTF_CAXBaseView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CTF_CAXBaseView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif




public: 
	HGLRC m_hRC;
	HDC   m_hDC;
public:
	virtual void RenderScene();
private:
	void GLInit();
	void GLRelease();
	void GLResize(int cx,int cy);
	void GLSetupRC();




protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CTF_CAXBaseView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in TF_CAXBaseView.cpp
inline CTF_CAXBaseDoc* CTF_CAXBaseView::GetDocument()
   { return (CTF_CAXBaseDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TF_CAXBASEVIEW_H__F08B53B2_B252_46B7_8C77_7193B72E5FDE__INCLUDED_)
